home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 4 Dec 1996
- // Author: sgs
- //
- // Description:
- // These procs create the controls for a common modelling tolerances in
- // the property sheets and attribute windows.
- //
- // Input Arguments:
- // string $parent
- // string $node
- // string $positionalTolerance IF you want a positional tolerance wiget "showPositionalTolerance"
- // string $tangentTolerance IF you want a tangent tolerance wiget "showTangentTolerance"
- // string $curvatureTolerance IF you want a curvature tolerance wiget "showCurvatureTolerance"
- //
- // Return Value:
- // None.
- //
-
- //
- // Description:
- // Connect the controls for all of the controls in the commonToleranceProperties dialog.
- //
- //
- global proc commonToleranceHistoryLink( string $parent, string $node,
- string $positionalTolerance,
- string $tangentTolerance,
- string $curvatureTolerance )
- {
- setParent $parent ;
-
- if ($positionalTolerance == "showPositionalTolerance")
- {
- // c(0) tolerance.
- //
- connectControl commonPositionalTolerance($node + ".pt");
- }
-
- if ($tangentTolerance == "showTangentTolerance")
- {
- // g(1) tolerance.
- //
- connectControl commonTangentTolerance($node + ".tt");
- }
-
- if ($curvatureTolerance == "showCurvatureTolerance")
- {
- // g(2) tolerance.
- //
- connectControl commonTangentTolerance($node + ".ct");
- }
-
- }
-
- //
- // Description:
- // Set the callbacks for all of the controls in the commonToleranceProperties dialog.
- // In simple terms show or hide tolerance stuff based on what is required by the tool
- //
- //
- global proc commonToleranceValues( string $parent, string $showSpecificTolerances,
- string $showPositionalTolerance,
- string $showTangentTolerance,
- string $showCurvatureTolerance)
- {
-
- setParent $parent;
-
- // Should any tolerances be shown, If so pop that tab foward, else hide all the tolerance stuff
- if ($showSpecificTolerances == "showSpecificTolerances")
- {
- tabLayout -e -selectTab dontShowTolerance_Tab specificTolerance_Tabs;
- radioButtonGrp -e
- -on1 ("tabLayout -e -selectTab dontShowTolerance_Tab specificTolerance_Tabs;")
- -on2 ("tabLayout -e -selectTab showTolerance_Tab specificTolerance_Tabs;")
- commonToleranceOptions;
-
- // Should position tolerance be shown, If so pop that tab foward,
- // else hide postion the tolerance stuff
- if ($showPositionalTolerance == "showPositionalTolerance")
- {
- tabLayout -e -selectTab showTolerancePosition_Tab tolerancePosition_Tabs;
- }
- else
- {
- tabLayout -e -selectTab dontShowTolerancePosition_Tab tolerancePosition_Tabs;
- }
-
- // Should tangent tolerance be shown, If so pop that tab foward,
- // else hide tangent the tolerance stuff
- if ($showTangentTolerance == "showTangentTolerance")
- {
- tabLayout -e -selectTab showToleranceTangent_Tab toleranceTangent_Tabs;
- }
- else
- {
- tabLayout -e -selectTab dontShowToleranceTangent_Tab toleranceTangent_Tabs;
- }
-
- // Should Curvature tolerance be shown, If so pop that tab foward,
- // else hide Curvature the tolerance stuff
- if ($showCurvatureTolerance == "showCurvatureTolerance")
- {
- tabLayout -e -selectTab showToleranceCurvature_Tab toleranceCurvature_Tabs;
- }
- else
- {
- tabLayout -e -selectTab dontShowToleranceCurvature_Tab toleranceCurvature_Tabs;
- }
- } else
- {
- tabLayout -e -selectTab dontShowTolerance_Tab specificTolerance_Tabs;
- radioButtonGrp -e
- -on1 ("tabLayout -e -selectTab dontShowTolerance_Tab specificTolerance_Tabs;")
- -on2 ("tabLayout -e -selectTab showTolerance_Tab specificTolerance_Tabs;")
- commonToleranceOptions;
- }
- }
-
- //
- // Description:
- // This procedure builds the standard modeling tolerances but by
- // default none of them are shown. If your procedure needs them
- // use the commonToleranceValues procedure passing
- // IF you want a positional tolerance wiget pass in "showPositionalTolerance"
- // IF you want a tangent tolerance wiget pass in "showTangentTolerance"
- // IF you want a curvature tolerance wiget pass in "showCurvatureTolerance"
- //
- global proc commonToleranceProperties( string $parent, string $node,
- string $positionalTolerance,
- string $tangentTolerance,
- string $curvatureTolerance )
- {
- setParent $parent;
- setUITemplate -pushTemplate DefaultTemplate;
- frameLayout -l "Tolerances" -borderVisible false -labelIndent 20 commonTolerance_Frame;
- columnLayout commonTolerance_Column;
-
- radioButtonGrp -nrb 2 -l "Use Tolerance"
- -l1 "Global"
- -l2 "Local"
- -select 1
- commonToleranceOptions;
-
- tabLayout -childResizable true -tabsVisible false specificTolerance_Tabs;
- columnLayout dontShowTolerance_Tab;
- setParent ..;
-
- columnLayout -adj true showTolerance_Tab;
- tabLayout -childResizable true -tabsVisible false tolerancePosition_Tabs;
- columnLayout -adj true dontShowTolerancePosition_Tab;
- setParent ..;
-
- columnLayout -adj true showTolerancePosition_Tab;
- separator -style "none" -h 1;
- floatSliderGrp -l "Positional"
- -min 0.0001 -max 1.0 -fmn 0.00001 -fmx 1000.0
- commonPositionalTolerance;
- setParent ..;
- setParent ..;
-
- tabLayout -childResizable true -tabsVisible false toleranceTangent_Tabs;
- columnLayout dontShowToleranceTangent_Tab;
- setParent ..;
-
- columnLayout -adj true showToleranceTangent_Tab;
- floatSliderGrp -l "Tangent"
- -min 0.0001 -max 1.0 -fmn 0.00001 -fmx 1000.0
- commonTangentTolerance;
- setParent ..;
- setParent ..;
-
- tabLayout -childResizable true -tabsVisible false toleranceCurvature_Tabs;
- columnLayout dontShowToleranceCurvature_Tab;
- setParent ..;
-
- columnLayout -adj true showToleranceCurvature_Tab;
- floatSliderGrp -l "Curvature"
- -min 0.0001 -max 1.0 -fmn 0.00001 -fmx 1000.0
- commonCurvatureTolerance;
- setParent ..;
- setParent ..;
- setParent ..;
- setParent ..;
- setParent ..;
- setParent ..;
-
- setUITemplate -popTemplate;
- commonToleranceValues( $parent, "showSpecificTolerances",
- $positionalTolerance,
- $tangentTolerance,
- $curvatureTolerance);
- commonToleranceHistoryLink ($parent, $node,
- $positionalTolerance,
- $tangentTolerance,
- $curvatureTolerance);
-
-
- }
-